Vue.component("simple-answer", {
	props: {
		'number': {
			type: Number,
			default: 0,
		},
		'ques': {
			type: Object,
			default: {}
		}
	},
	template: `
			<div>
				<div>{{number}}.{{ques.title}}</div>
				<textarea class="text-answer" v-model="myAns" @blur="result"></textarea>
			</div>`,
	data: function() {
		return {
			myAns: "",
			isDo: false,
			subShow: true,
			reShow: false
		}
	},
	methods: {
		result: function() {
			if (!!!this.myAns) {
				alert('请作答');
			}else{
				this.$emit('getans',{'id':this.ques.id, 'myAns':[this.myAns]});
			}
		}
	}
})
